﻿<phone:PhoneApplicationPage
        x:Class="Flag.Page1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
        xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}"
        SupportedOrientations="Portrait" Orientation="Portrait"
        mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
        shell:SystemTray.IsVisible="True">

    <!--LayoutRoot è la griglia radice in cui viene inserito tutto il contenuto della pagina-->
    <Grid x:Name="LayoutRoot" Background="Transparent">

        <!--TitlePanel contiene il nome dell'applicazione e il titolo della pagina-->
        <StackPanel x:Name="TitlePanell" Grid.Row="0" >
            <TextBlock x:Name="PageTitle" Margin="0,200" TextAlignment="Center" Style="{StaticResource PhoneTextTitle1Style}">
                Waiting for <LineBreak/>
                connection...
            </TextBlock>
        </StackPanel>



        <Button x:Name="PageTitle1" VerticalAlignment="Bottom" Height="100" Width="200" FontSize="35" Click="PageTitle1_Click">
            Cancel
        </Button>

        <Canvas Margin="0,460" HorizontalAlignment="Center">
            <Canvas.RenderTransform>
                <TransformGroup>

                    <RotateTransform x:Name="angle" Angle="0" CenterX="0.5" CenterY="0.5"/>

                    <TranslateTransform X="-0.5" Y="-0.5"/>
                    <ScaleTransform ScaleX="100" ScaleY="100"/>

                </TransformGroup>
            </Canvas.RenderTransform>

            <Canvas.Triggers>
                <EventTrigger RoutedEvent="Canvas.Loaded">
                    <BeginStoryboard>
                        <Storyboard x:Name="rotation">
                            <DoubleAnimation To="1" Duration="0:0:1"
                                                                                                             Storyboard.TargetName="content"
                                                                                                             Storyboard.TargetProperty="Opacity"/>
                            <DoubleAnimation From="0" To="359" Duration="0:0:3" RepeatBehavior="Forever"
                                                                                                             Storyboard.TargetName="angle"
                                                                                                             Storyboard.TargetProperty="Angle"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Canvas.Triggers>

            <Canvas Name="content" Opacity="0">

                <Path Width="1" Height="1" Stretch="Fill" Stroke="White" StrokeThickness="0.1" StrokeStartLineCap="Round" StrokeEndLineCap="Round">
                    <Path.Data>
                        <PathGeometry>
                            <PathFigure StartPoint="1,0">
                                <ArcSegment Point="0,-1" RotationAngle="90" SweepDirection="Clockwise" IsLargeArc="True" Size="1,1"/>
                            </PathFigure>
                        </PathGeometry>
                    </Path.Data>
                </Path>

            </Canvas>
        </Canvas>

        <!--ContentPanel - inserire ulteriore contenuto qui-->
    </Grid>

</phone:PhoneApplicationPage>
